import base from "./base";
import request from '@/utils/request'

const api = {
    getHotKeySearch() { return request.get(base.hotKeySearch);},//热搜
    getSuggestSearch(params) { return request.get(base.suggestSearch,{params});},//params{keywords:xx}?keywords=海阔天空
    // getSuggestSearch(keywords){return request.get(base.suggestSearch+'?keywords='+keywords)},
    //搜索列表type: 搜索类型；默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手,
      //  1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台,
      //  1014: 视频, 1018:综合, 2000:声音(搜索声音返回字段格式会不一样)                                   //默认limit为30，offest为0,type为1
    getCloudsearch(params){ return request.get(base.cloudsearch,{params});},///cloudsearch?keywords=海阔天空params{limit:xx,offset:xx,type:xx}  
    getBanner() { return request.get(base.banner);},//获取轮播图
    getCatList(){return request.get(base.catList)},//歌单分类
    getHotPalyList(){return request.get(base.hotPalyList)},//获取热门歌单分类
    getPlayList(params){ return request.get(base.playList,{params})}, //歌单列表//params{}
    getAmbulList(params){return request.get(base.albumList,{params})},//新碟上架//params{}
    getAlbum(id){return request.get(base.album,{params:{id}})},//专辑详情
    getAlbumDetail(id){return request.get(base.albumDetail,{params:{id}})},//专辑详情与评论数收藏数。。。
    getArtistAlbum(params){return request.get(base.artistAlbum,{params})},//歌手专辑
    getTopList(){return request.get(base.topList);},//排行榜
    getTopListDetail(){return request.get(base.topListDetail);},//排行榜摘要
    getSongList(params){return request.get(base.songList,{params});}, //歌单详情列表params{id:xx}
    getSubscribers(params){return request.get(base.subscribers,{params});},//歌单收藏params:{id,limit=20}
    getRelated(id){return request.get(base.related,{params:{id}})},//相关歌单
    getPlaylistTrack(params){return request.get(base.playlistTrack,{params});},//相关歌单歌曲
    getNewMv(params){return request.get(base.newMv,{params})}, //最新mv//params{limit:xx}
    getAllMv(params){return request.get(base.allMv,{params})},//全部mv,params{limit:xx,offset:xx}
    getMvUrl(params){return request.get(base.mvUrl,{params})},//mv地址,params:{id,r}
    getSimiMv(mid){return request.get(base.simiMv,{params:{mvid:mid}})},//相似mv,params:{mvid}
    getDetailMv(mid){return request.get(base.detailMv,{params:{mvid:mid}})},//mv详情
    gethotSinger(params){return request.get(base.hotSinger,{params})},//热门歌手//params{limit:xx,offset:xx}
    getsingerType(params){return request.get(base.singerType,{params})},//歌手分类//params{limit:xx,offset:xx,type:xx,initial:xx}
    getsingerDetail(id){return request.get(base.singerDetail,{params:{id}})},//歌手详情
    getSingerDesc(id){return request.get(base.singerDesc,{params:{id}})},//歌手描述
    getSingerSong(id){return request.get(base.singerSong,{params:{id}})},//歌手单曲
    getSingerAlbum(params){return request.get(base.singerAlbum,{params})},//歌手专辑artist/album?id=6452&limit=30
    getSingerMv(id){return request.get(base.singerMv,{params:{id}})},//歌手mv
    getCommentSong(params){return request.get(base.commentSong,{params})},//歌曲评论params{id:xx,limit:xx,offset:xx,before:xx}
    getCommentAlbum(params){return request.get(base.commentAlbum,{params})},//专辑评论params{id:xx,limit:xx,offset:xx,before:xx}
    getCommentVideo(params){return request.get(base.commentVideo,{params})},//视频评论params{id:xx,limit:xx,offset:xx,before:xx}
    getCommentMv(params){return request.get(base.commentMv,{params})},//mv评论params{id:xx,limit:xx,offset:xx,before:xx}
    getCommentPlaylist(params){return request.get(base.commentPlaylist,{params})},//歌单评论params{id:xx,limit:xx,offset:xx,before:xx}
    getSimiSong(id){return request.get(base.simiSong,{params:{id}})},//相似歌曲
    getLyric(id){return request.get(base.lyric,{params:{id}})},//歌词
    getSongDetail(id){return request.get(base.songDetail,{params:{ids:id}})},//歌曲详情
}
export default api